<!DOCTYPE html>
<!--土壤-->
<html>
<head>
    <meta charset="utf-8">
    <title>首页二</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <link rel="stylesheet" href="../../layui/css/layui.css" media="all">
    <link rel="stylesheet" href="../../js/libs/font-awesome/css/font-awesome.min.css" media="all">
    <link rel="stylesheet" href="../../layui/ThirdPageCss/public.css" media="all">
    <style>
        .layui-card {border:1px solid #f2f2f2;border-radius:5px;}
        .icon {margin-right:10px;color:#1aa094;}
        .icon-cray {color:#ffb800!important;}
        .icon-blue {color:#1e9fff!important;}
        .icon-tip {color:#ff5722!important;}
        .layuimini-qiuck-module {text-align:center;margin-top: 10px}
        .layuimini-qiuck-module a i {display:inline-block;width:100%;height:60px;line-height:60px;text-align:center;border-radius:2px;font-size:30px;background-color:#F8F8F8;color:#333;transition:all .3s;-webkit-transition:all .3s;}
        .layuimini-qiuck-module a cite {position:relative;top:2px;display:block;color:#666;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;font-size:14px;}
        .welcome-module {width:100%;height:210px;}
        .panel {background-color:#fff;border:1px solid transparent;border-radius:3px;-webkit-box-shadow:0 1px 1px rgba(0,0,0,.05);box-shadow:0 1px 1px rgba(0,0,0,.05)}
        .panel-body {padding:10px}
        .panel-title {margin-top:0;margin-bottom:0;font-size:12px;color:inherit}
        .label {display:inline;padding:.2em .6em .3em;font-size:75%;font-weight:700;line-height:1;color:#fff;text-align:center;white-space:nowrap;vertical-align:baseline;border-radius:.25em;margin-top: .3em;}
        .layui-red {color:red}
        .main_btn > p {height:40px;}
        .layui-bg-number {background-color:#F8F8F8;}
        .layuimini-notice:hover {background:#f6f6f6;}
        .layuimini-notice {padding:7px 16px;clear:both;font-size:12px !important;cursor:pointer;position:relative;transition:background 0.2s ease-in-out;}
        .layuimini-notice-title,.layuimini-notice-label {
            padding-right: 70px !important;text-overflow:ellipsis!important;overflow:hidden!important;white-space:nowrap!important;}
        .layuimini-notice-title {line-height:28px;font-size:14px;}
        .layuimini-notice-extra {position:absolute;top:50%;margin-top:-8px;right:16px;display:inline-block;height:16px;color:#999;}
    </style>
</head>
<body>
<div class="layuimini-container">
    <div class="layuimini-main">
        <div class="layui-row layui-col-space15">
            <div class="layui-col-md8">
                <div class="layui-row layui-col-space15">
                    <div class="layui-col-md6">
                        <div class="layui-card">
                            <div class="layui-card-header"><i class="fa fa-warning icon"></i>土壤温度</div>
                            <div class="layui-card-body">
                                <div class="welcome-module">
                                    <div class="layui-row layui-col-space10">
                                        <div class="layui-col-xs6">
                                            <div class="panel layui-bg-number">
                                                <div class="panel-body">
                                                    <div class="panel-title">
                                                        <span class="label pull-right layui-bg-blue">实时</span>
                                                        <h5>近七天平均土壤温度</h5>
                                                    </div>
                                                    <div class="panel-content">
                                                        <small><br></small>
                                                        <h1 class="no-margins">-11.7℃</h1>

                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="layui-col-xs6">
                                            <div class="panel layui-bg-number">
                                                <div class="panel-body">
                                                    <div class="panel-title">
                                                        <span class="label pull-right layui-bg-cyan">实时</span>
                                                        <h5>当前土壤温度</h5>
                                                    </div>
                                                    <div class="panel-content">
                                                        <small><br></small>
                                                        <h1 class="no-margins">3℃</h1>

                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="layui-col-xs6">
                                            <div class="panel layui-bg-number">
                                                <div class="panel-body">
                                                    <div class="panel-title">
                                                        <span class="label pull-right layui-bg-orange">实时</span>
                                                        <h5>当前天气</h5>
                                                    </div>
                                                    <div class="panel-content">
                                                        <small><br></small>
                                                        <h1 class="no-margins">晴天</h1>

                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="layui-col-xs6">
                                            <div class="panel layui-bg-number">
                                                <div class="panel-body">
                                                    <div class="panel-title">
                                                        <span class="label pull-right layui-bg-green">实时</span>
                                                        <h5>照度</h5>
                                                    </div>
                                                    <div class="panel-content">
                                                        <small><br></small>
                                                        <h1 class="no-margins">40Lux</h1>

                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="layui-col-md6">
                        <div class="layui-card">
                            <div class="layui-card-header"><i class="fa fa-warning icon"></i>土壤湿度</div>
                            <div class="layui-card-body">
                                <div class="welcome-module">
                                    <div class="layui-row layui-col-space10">
                                        <div class="layui-col-xs6">
                                            <div class="panel layui-bg-number">
                                                <div class="panel-body">
                                                    <div class="panel-title">
                                                        <span class="label pull-right layui-bg-blue">实时</span>
                                                        <h5>近七天平均土壤湿度</h5>
                                                    </div>
                                                    <div class="panel-content">
                                                        <small><br></small>
                                                        <h1 class="no-margins">11.1%</h1>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="layui-col-xs6">
                                            <div class="panel layui-bg-number">
                                                <div class="panel-body">
                                                    <div class="panel-title">
                                                        <span class="label pull-right layui-bg-cyan">实时</span>
                                                        <h5>当前土壤湿度</h5>
                                                    </div>
                                                    <div class="panel-content">
                                                        <small><br></small>
                                                        <h1 class="no-margins">13.2%</h1>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="layui-col-xs6">
                                            <div class="panel layui-bg-number">
                                                <div class="panel-body">
                                                    <div class="panel-title">
                                                        <span class="label pull-right layui-bg-orange">实时</span>
                                                        <h5>当前雨量</h5>
                                                    </div>
                                                    <div class="panel-content">
                                                        <small><br></small>
                                                        <h1 class="no-margins">0mm</h1>

                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="layui-col-xs6">
                                            <div class="panel layui-bg-number">
                                                <div class="panel-body">
                                                    <div class="panel-title">
                                                        <span class="label pull-right layui-bg-green">实时</span>
                                                        <h5>当前大气湿度</h5>
                                                    </div>
                                                    <div class="panel-content">
                                                        <small><br></small>
                                                        <h1 class="no-margins">78.8%RH</h1>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="layui-col-md12">
                        <div class="layui-card">
                            <div class="layui-card-header"><i class="fa fa-line-chart icon"></i>土壤温度-土壤湿度关系图</div>
                            <div class="layui-card-body">
                                <div id="echarts-records" style="width: 100%;min-height:300px"></div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>

            <div class="layui-col-md4">

                <div class="layui-card">
                    <div class="layui-card-header"><i class="fa fa-bullhorn icon icon-tip"></i>近七天土壤温度</div>
                    <div class="layui-card-body layui-text">
                        <div class="layuimini-notice">
                            <div class="layuimini-notice-title">天气:晴天&nbsp;&nbsp;&nbsp;&nbsp;土壤温度:3℃</div>
                            <div class="layuimini-notice-extra">2021-11-11 23:06</div>

                        </div>
                        <div class="layuimini-notice">
                            <div class="layuimini-notice-title">天气:雨天 &nbsp;&nbsp;&nbsp;&nbsp;土壤温度:-11.7℃</div>
                            <div class="layuimini-notice-extra">2021-11-12 23:06</div>

                        </div>
                        <div class="layuimini-notice">
                            <div class="layuimini-notice-title">天气:晴天 &nbsp;&nbsp;&nbsp;&nbsp;土壤温度:3℃</div>
                            <div class="layuimini-notice-extra">2021-11-13 14:28</div>

                        </div>
                        <div class="layuimini-notice">
                            <div class="layuimini-notice-title">天气:晴天 &nbsp;&nbsp;&nbsp;&nbsp;土壤温度:3℃</div>
                            <div class="layuimini-notice-extra">2021-11-14 11:02</div>
                        </div>
                        <div class="layuimini-notice">
                            <div class="layuimini-notice-title">天气:晴天 &nbsp;&nbsp;&nbsp;&nbsp;土壤温度:3℃</div>
                            <div class="layuimini-notice-extra">2021-11-15 11:55</div>

                        </div>
                        <div class="layuimini-notice">
                            <div class="layuimini-notice-title">天气:晴天 &nbsp;&nbsp;&nbsp;&nbsp;土壤温度:3℃</div>
                            <div class="layuimini-notice-extra">2021-11-16 14:53</div>

                        </div>
                    </div>
                </div>

                <div class="layui-card">
                    <div class="layui-card-header"><i class="fa fa-bullhorn icon icon-tip"></i>近七天土壤湿度</div>
                    <div class="layui-card-body layui-text">
                        <div class="layuimini-notice">
                            <div class="layuimini-notice-title">天气:晴天&nbsp;&nbsp;&nbsp;&nbsp;土壤湿度:13.2%</div>
                            <div class="layuimini-notice-extra">2021-11-11 23:06</div>

                        </div>
                        <div class="layuimini-notice">
                            <div class="layuimini-notice-title">天气:雨天 &nbsp;&nbsp;&nbsp;&nbsp;土壤湿度:30.2%</div>
                            <div class="layuimini-notice-extra">2021-11-12 23:06</div>

                        </div>
                        <div class="layuimini-notice">
                            <div class="layuimini-notice-title">天气:晴天 &nbsp;&nbsp;&nbsp;&nbsp;土壤湿度:13.2%</div>
                            <div class="layuimini-notice-extra">2021-11-13 14:28</div>

                        </div>
                        <div class="layuimini-notice">
                            <div class="layuimini-notice-title">天气:晴天 &nbsp;&nbsp;&nbsp;&nbsp;土壤湿度:13.2%</div>
                            <div class="layuimini-notice-extra">2021-11-14 11:02</div>
                        </div>
                        <div class="layuimini-notice">
                            <div class="layuimini-notice-title">天气:晴天 &nbsp;&nbsp;&nbsp;&nbsp;土壤湿度:13.2%</div>
                            <div class="layuimini-notice-extra">2021-11-15 11:55</div>

                        </div>
                        <div class="layuimini-notice">
                            <div class="layuimini-notice-title">天气:晴天 &nbsp;&nbsp;&nbsp;&nbsp;土壤湿度:13.2%</div>
                            <div class="layuimini-notice-extra">2021-11-16 14:53</div>

                        </div>
                    </div>
                </div>

                <!--<div class="layui-card">-->
                    <!--<div class="layui-card-header"><i class="fa fa-paper-plane-o icon"></i>作者心语</div>-->
                    <!--<div class="layui-card-body layui-text layadmin-text">-->
                        <!--<p>本模板基于layui2.5.4以及font-awesome-4.7.0进行实现。layui开发文档地址：<a class="layui-btn layui-btn-xs layui-btn-danger" target="_blank" href="http://www.layui.com/doc">layui文档</a></p>-->
                        <!--<p>技术交流QQ群（716235988）：<a target="_blank" href="https://jq.qq.com/?_wv=1027&k=7TMTuAJv"><img border="0" src="//pub.idqqimg.com/wpa/images/group.png" alt="layuimini" title="layuimini"></a>（加群请备注来源：如gitee、github、官网等）</p>-->
                        <!--<p>喜欢此后台模板的可以给我的GitHub和Gitee加个Star支持一下</p>-->
                    <!--</div>-->
                <!--</div>-->

            </div>
        </div>
    </div>
</div>
<script src="../../layui/layui.js" charset="utf-8"></script>
<script src="../../layui/lay-config.js?v=1.0.4" charset="utf-8"></script>
<script type="text/javascript" src="../../js/echarts/echarts.min.js"></script>
<script src="../../js/libs/jquery-2.1.1.min.js"></script>
<script type="text/javascript">


    var chartDom = document.getElementById('echarts-records');
    var myChart = echarts.init(chartDom, null, {
        width: 900,
        height: 500
    });

    // prettier-ignore
    const data = [["2020-06-05", 116], ["2020-06-06", 129], ["2020-06-07", 135],
        ["2020-06-08", 86], ["2020-06-09", 73], ["2020-06-10", 85], ["2020-06-11", 73],
        ["2020-06-12", 68], ["2020-06-13", 92], ["2020-06-14", 130], ["2020-06-15", 245],
        ["2020-06-16", 139], ["2020-06-17", 115], ["2020-06-18", 111], ["2020-06-19", 309],
        ["2020-06-20", 206], ["2020-06-21", 137], ["2020-06-22", 128], ["2020-06-23", 85],
        ["2020-06-24", 94], ["2020-06-25", 71], ["2020-06-26", 106], ["2020-06-27", 84],
        ["2020-06-28", 93], ["2020-06-29", 85], ["2020-06-30", 73], ["2020-07-01", 83],
        ["2020-07-02", 125], ["2020-07-03", 107], ["2020-07-04", 82], ["2020-07-05", 44],
        ["2020-07-06", 72], ["2020-07-07", 106], ["2020-07-08", 107], ["2020-07-09", 66],
        ["2020-07-10", 91], ["2020-07-11", 92], ["2020-07-12", 113], ["2020-07-13", 107],
        ["2020-07-14", 131], ["2020-07-15", 111], ["2020-07-16", 64], ["2020-07-17", 69],
        ["2020-07-18", 88], ["2020-07-19", 77], ["2020-07-20", 83], ["2020  -07-21", 111],
        ["2020-07-22", 57], ["2020-07-23", 55], ["2020-07-24", 60]];
    const dateList = data.map(function (item) {
        return item[0];
    });
    const valueList = data.map(function (item) {
        return item[1];
    });
    option = {
        // Make gradient line here
        visualMap: [
            {
                show: false,
                type: 'continuous',
                seriesIndex: 0,
                min: 0,
                max: 400
            },
            {
                show: false,
                type: 'continuous',
                seriesIndex: 1,
                dimension: 0,
                min: 0,
                max: dateList.length - 1
            }
        ],
        title: [
            {
                left: 'center',
                text: '土壤温度'
            },
            {
                top: '55%',
                left: 'center',
                text: '土壤湿度'
            }
        ],
        tooltip: {
            trigger: 'axis'
        },
        xAxis: [
            {
                data: dateList
            },
            {
                data: dateList,
                gridIndex: 1
            }
        ],
        yAxis: [
            {},
            {
                gridIndex: 1
            }
        ],
        grid: [
            {
                bottom: '60%'
            },
            {
                top: '60%'
            }
        ],
        series: [
            {
                type: 'line',
                showSymbol: false,
                data: valueList
            },
            {
                type: 'line',
                showSymbol: false,
                data: valueList,
                xAxisIndex: 1,
                yAxisIndex: 1
            }
        ]
    };
    // 3. 把配置和数据给实例对象
    myChart.setOption(option);

    // 重新把配置好的新数据给实例对象
    myChart.setOption(option);
    window.addEventListener("resize", function() {
        myChart.resize();
    });
</script>

</body>
</html>
